Non-transitory computer-readable storage medium storing image processing program, image processing system, image processing apparatus, and image processing method

ABSTRACT

An example image processing apparatus disposes a virtual camera and a terrain object in a virtual space, and generates grass objects at a predetermined region located with reference to a land horizon that is a boundary between the terrain object and a background as viewed from the virtual camera. A player character is displayed at a position closer to the virtual camera, and the grass objects are generated in the predetermined region located with reference to the land horizon. Therefore, the terrain can be represented to look real, and the player character can be more easily seen.

CROSS REFERENCE TO RELATED APPLICATION

The disclosure of Japanese Patent Application No. 2019-54189, filed Mar.22, 2019, is incorporated herein by reference.

FIELD

The present disclosure relates to image processing programs, imageprocessing systems, image processing apparatuses, and image processingmethods that are capable of generating an image.

BACKGROUND AND SUMMARY

There is a game apparatus that disposes a player character in a virtualterrain, and operates the player character on the terrain.

However, there is room for improvement of representation of a terrainwhile ensuring that the representation is easy to see.

With this in mind, it is an object of this embodiment to provide animage processing program, image processing system, image processingapparatus, and image processing method that are capable of providingimproved representation of a terrain while ensuring that therepresentation is easy to see.

To achieve the above, this non-limiting example embodiment has thefollowing features.

An image processing program of this embodiment causes a computer of aninformation processing apparatus to control a virtual camera in avirtual space, and dispose a terrain object in the virtual space. Theimage processing program also causes the computer to execute generatingan object in a range located with reference to a boundary line betweenthe terrain object and a background as viewed from the virtual camera,on the terrain object. The image processing program also causes thecomputer to execute generating an image of the virtual space, based onthe virtual camera, the image being to be displayed on a display device.

Accordingly, an object is generated in a range located with reference toa boundary line between a terrain object and a background as viewed froma virtual camera. As a result, for example, representation of theterrain in the range located with reference to the boundary line can beimproved, and a region closer to the virtual camera than the range iscan be more easily seen.

The terrain object may be in the shape of at least a portion of the sidesurface of a cylinder or at least a portion of a spherical surface.

Accordingly, the terrain object is the side surface of a cylinder or aspherical surface, and therefore, a boundary between the terrain objectand the background as viewed from the virtual camera can be more easilyidentified.

The image processing program may cause the computer to further executedeforming at least a range of a flat terrain corresponding a field ofview of the virtual camera, to generate the terrain object having acurved surface shape.

Accordingly, a curved terrain object can be formed by deforming a flatterrain. Therefore, it is not necessary to previously prepare a curvedterrain object, resulting in an improvement in development efficiency.

The boundary line may be determined based on a positional relationshipbetween the virtual camera and the terrain object.

Accordingly, the boundary line is determined between a positionalrelationship between the virtual camera and the terrain object.Therefore, for example, when the virtual camera moves relative to theterrain object, the boundary line also moves, and the object can bedynamically generated.

The boundary line may be determined based on a point of tangency of atangent line from the virtual camera to the curved surface.

Accordingly, a line determined based on a point of tangency of a tangentline from the virtual camera to the curved surface can be set as aboundary line. Therefore, a boundary line between the terrain object andthe background can be determined.

The computer may include a graphics processor having a vertex shaderfunction, and the deformation of the terrain and the generation of theobject may be performed by coordinate conversion using the vertex shaderfunction.

Accordingly, vertices of each object are displaced by the graphicsprocessor using the vertex shader function, resulting in a higher-speedprocess.

The object may include a grass object. The image processing program mayalso cause the computer to generate, on a portion of the terrain objecton which generation of the grass object is allowed, the grass object bycoordinate conversion of a vertex of the grass object so that the grassobject, when located closer to the virtual camera in the range, has ashorter length.

Accordingly, for example, a scene that grass grows on the terrain objectcan be represented.

The object may include a snow object. The image processing program mayalso cause the computer to generate, on a portion of the terrain objecton which generation of the snow object is allowed, the snow object bycoordinate conversion of a vertex of the snow object so that the snowobject, when located closer to the virtual camera in the range, has ashorter length.

Accordingly, for example, a scene that snow lies on the terrain objectcan be represented.

The object may have a height, and the object may be generated so thatthe height of the object varies depending on a distance thereof from thevirtual camera.

Accordingly, a height of the object can be decreased with a decrease indistance to the virtual camera. Conversely, the height of the object canbe increased with a decrease in distance to the boundary line. As aresult, a region close to the virtual camera can be more easily seen,and representation of a region close to the boundary line can beimproved.

The image processing program may cause the computer to further executemoving a player character on the terrain object according to anoperation input. A position of the virtual camera may be controlledbased on a position of the player character so that the player characteris located in front of the virtual camera in a line-of-sight directionof the virtual camera, and the boundary line is located further from thevirtual camera than the player character is in the line-of-sightdirection of the virtual camera.

Accordingly, the player character is located in front of the virtualcamera, and the boundary line is located further from the virtual camerathan the player character is, and the object is generated in a regionlocated with reference to the boundary line. Therefore, the playercharacter in front of the virtual camera can be more easily seen, andrepresentation of the region located further from the virtual camerathan the player character is can be improved.

The image processing program may cause the computer to further executedisposing an item object on the terrain object, and causing the playercharacter to perform an action on the item object, according to theoperation input.

Accordingly, the player character is located in front of the virtualcamera, and performs an action. A boundary line is located further fromthe virtual camera than the player character is, and the object isgenerated in a region located with reference to the boundary line.Therefore, an action performed by the player character in front of thevirtual camera can be more easily seen, and representation of the regionlocated further from the virtual camera than the player character is canbe improved.

The image processing program may cause the computer to further executemoving a player character on the terrain object that is flat, in thevirtual space, according to an operation input, and controlling aposition of the virtual camera based on a position of the playercharacter. The image processing program may cause the computer tofurther execute generating the object at a position corresponding to therange on the flat terrain object based on the position of the virtualcamera, and displacing vertices of the terrain object, the object, andthe player character that are included in at least a field of view ofthe virtual camera so that the flat terrain object is deformed into acurved surface.

Accordingly, the player character can be moved on the flat terrainobject, and the object can be generated in a range on the flat terrainobject, and thereafter, vertices of the flat terrain object, the object,and the player character can be displaced so that the flat terrainobject is deformed into a curved surface.

In other embodiments, an image processing apparatus and image processingsystem for executing the above process may be provided, and an imageprocessing method to be executed by the image processing system may beprovided.

According to this embodiment, representation of a terrain in a rangewith reference to a boundary line can be improved, and a region closerto a virtual cameral than the region is can be more easily seen.

These and other objects, features, aspects and advantages of the presentexemplary embodiment will become more apparent from the followingdetailed description of the present exemplary embodiment when taken inconjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a non-limiting example game system 1 in this embodiment,

FIG. 2 is a block diagram showing a non-limiting example internalconfiguration of the game system 1,

FIG. 3 is a diagram showing a non-limiting example virtual space inwhich a game of this embodiment is played,

FIG. 4 is a diagram showing a non-limiting example image that isdisplayed on a display 12 when the game of this embodiment is beingexecuted, where no grass objects are shown,

FIG. 5 is a diagram showing a non-limiting example image that isdisplayed on the display 12 when the game of this embodiment is beingexecuted, where grass objects 32 are displayed,

FIG. 6 is a diagram showing a non-limiting example virtual space beforea drum deformation process is performed,

FIG. 7 is a diagram showing a non-limiting example virtual space afterthe drum deformation process is performed,

FIG. 8 is a diagram showing a non-limiting example virtual space asviewed in a direction parallel to an x-axis before the drum deformationprocess is performed,

FIG. 9 is a diagram showing a non-limiting example virtual space asviewed in a direction parallel to the x-axis after the drum deformationprocess is performed,

FIG. 10 is a diagram for describing a method for determining a grassgeneration region,

FIG. 11 is a diagram showing a non-limiting example height of a grassobject 32,

FIG. 12 is a diagram showing a non-limiting example in which a virtualcamera VC has moved relative to a ground object 30 from the state ofFIG. 10,

FIG. 13 is a diagram showing non-limiting example data stored in a bodyapparatus 2 (DRAM 26 thereof),

FIG. 14 is a flowchart showing a non-limiting example game processperformed in a processor 20 of the body apparatus 2, and

FIG. 15 is a flowchart showing a non-limiting example of a grassgeneration process of step S107.

DETAILED DESCRIPTION OF NON-LIMITING EXAMPLE EMBODIMENTS SystemConfiguration

A game system 1 (non-limiting example image processing system) accordingto this embodiment will now be described with reference to theaccompanying drawings. FIG. 1 is a diagram showing a non-limitingexample of the game system 1 of this embodiment. As shown in FIG. 1, thegame system 1 includes a body apparatus (non-limiting example imageprocessing apparatus) 2 as a game apparatus, a left controller 3, and aright controller 4. The body apparatus 2 includes a display 12. Notethat the left controller 3 and the right controller 4 may be removablefrom the body apparatus 2.

The left controller 3 is controlled using the user's left hand, and theright controller 4 is controlled using the user's right hand. The leftcontroller 3 and the right controller 4 include a plurality of operationbuttons, and an analog stick as a direction input unit.

FIG. 2 is a block diagram showing a non-limiting example internalconfiguration of the game system 1. As shown in FIG. 2, the bodyapparatus 2 includes a processor 20, a slot interface 23, a slot 24, aflash memory 25, and a DRAM 26. The processor 20 includes a centralprocessing unit (CPU) 21 and a graphics processing unit (GPU) 22. TheCPU 21 can execute a game program to process operation data from thecontrollers 3 and 4, execute a game process based on the operation data,and transmit an instruction to the GPU 22 to generate an image. The GPU22 is a processor for performing image processing. The GPU 22 has avertex shader function for converting coordinates of vertices of avirtual object. Note that the CPU 21 and the GPU 22 may be mounted onseparate chips or may be mounted on a single chip as a system-on-a-chip(SoC).

The processor 20 is coupled to the slot interface 23, the flash memory25, the DRAM 26, and the display 12. The processor 20 is also coupledthrough a left interface to the left controller 3, and through a rightinterface to the right controller 4. An external storage medium isremovably inserted into the slot 24. The external storage medium storesa program (a game program described below) and data (a flat groundobject, etc., described below). Note that the program and data may bepreviously stored in the flash memory 25, or may be downloaded andstored into the flash memory 25 through a network (e.g., the Internet).

The program and data stored in the external storage medium (or the flashmemory 25) are loaded to the DRAM 26 during the start of a gamedescribed below. The CPU 21 executes the program to perform a gameprocess described below. The CPU 21 also transmits an instruction to theGPU 22 to display an image on the display 12, and the GPU 22 renders animage according to the instruction, and causes the display 12 to displaythe image. Note that the body apparatus 2 may be coupled to an externaldisplay apparatus different from the display 12, and an image generatedby the GPU 22 may be displayed on the external display apparatus.

Overview of Game and Image Processing of This Embodiment

Next, a game of this embodiment will be outlined. FIG. 3 is a diagramshowing a non-limiting example virtual space in which the game of thisembodiment is played. When the game program of this embodiment isexecuted, a virtual space is defined in the body apparatus 2, andvarious virtual objects are disposed in the virtual space. A user(player) moves a player character 40 in the virtual space using the leftcontroller 3 and the right controller 4, so that the game proceeds.

As shown in FIG. 3, an xyz orthogonal coordinate system is set in thevirtual space. The x-axis is a lateral direction axis of the virtualspace, the z-axis is a depth direction axis of the virtual space, andthe y-axis is a height direction axis of the virtual space. In thevirtual space, as virtual objects, a ground object 30 and a river object31 are disposed. The ground object 30 is a flat object, e.g. a surfaceparallel to the xz plane. Note that the ground object 30 may be asubstantially flat surface that has irregularities or unevenness (agenerally flat surface), or may be an exactly flat surface that does nothave irregularities or unevenness. The ground object 30 and the riverobject 33 are terrain objects representing the terrain in the virtualspace.

In addition, a house object 35, a tree object 36, and a cliff object 37are disposed as virtual objects on the ground object 30 in the virtualspace. The cliff object 37 is also a terrain object that represents aterrain in the virtual space. The player character 40 is disposed on aterrain object. A virtual camera VC is disposed behind the playercharacter 40.

In a game of this embodiment, the user operates a controller (the leftcontroller 3 or the right controller 4) to cause the player character 40to move on the ground object 30 and perform a predetermined motion, sothat the game proceeds. The virtual camera VC is located at apredetermined position behind the player character 40, and is moved,depending on the movement of the player character 40. The display 12displays an image of the virtual space as viewed from the virtual cameraVC.

FIG. 4 is a diagram showing a non-limiting example image that isdisplayed on the display 12 when the game of this embodiment is beingexecuted, where no grass objects are shown. FIG. 5 is a diagram showinga non-limiting example image that is displayed on the display 12 whenthe game of this embodiment is being executed, where grass objects 32are displayed.

As shown in FIG. 4, an image containing the ground object 30, the riverobject 31, the house object 35, the tree object 36, and the playercharacter 40 is displayed, on the display 12, as a non-limiting examplegame image of the virtual space as viewed from the virtual camera VC. Inthis embodiment, as described below, the flat ground object 30 is bentinto a drum shape during image generation, and an image containing theground object 30, bent into a drum shape, is displayed on the display12. In a game image, a boundary line between the ground object 30 andthe background is displayed as a land horizon. The ground object 30 isdivided into a plurality of objects such as a grassland object 30 a anda road object 30 b. The grassland object 30 a has a green colorrepresenting the presence of grass. The road object 30 b represents anearth region that is not covered with grass, and has a brown color.

The user causes the player character 40 to move the player character 40on the ground object 30 and perform a predetermined action. For example,the user moves the player character 40 to the position of the treeobject 36, and causes the player character 40 to perform a predeterminedmotion (e.g., a motion of swaying the tree object 36). As a result, afruit 36 a of the tree object 36 drops on the ground object 30, and theplayer character 40 acquires the fruit 36 a. Thus, in this embodiment,the player character 40 is moved, or the player character 40 is causedto perform a predetermined action (e.g., a motion of picking up thefruit 36 a) on an item object, so that the game proceeds.

Although no grass objects 32 are shown in FIG. 4, grass objects 32 aredisplayed in the game of this embodiment as shown FIG. 5.

Specifically, as shown in FIG. 5, grass objects 32 are generated anddisplayed on and near the land horizon as viewed from the virtual cameraVC. The grass object 32 is, for example, a triangular, green object. Twovertices included in the base of the grass object 32 are disposed so asto share the same positions as those of vertices of the ground object30, and the remaining vertex (peak vertex) of the grass object 32 islocated at a higher position than that of the ground object 30. Grassobjects 32 are generated in a predetermined region (also hereinafterreferred to as a “grass generation region”) located with reference tothe land horizon. Specifically, grass objects 32 are generated in agrass generation region including a region that includes the landhorizon and is closer to the virtual camera VC than the land horizon is,and a region that is further from the virtual camera VC than the landhorizon is in the line-of-sight direction of the virtual camera VC.

Grass objects 32 are dynamically generated in a grass generation regionlocated with reference to the land horizon. For example, when the playercharacter 40 moves on the ground object 30 according to the user'soperation, the virtual camera VC also moves, following the playercharacter 40. In this case, the position on the ground object 30 of theland horizon as viewed from the virtual camera VC differs before andafter the movement of the player character 40. For example, the houseobject 35 is located substantially on the land horizon in the screenshown in FIG. 5. When the player character 40 moves in the depthdirection of the screen (the positive line-of-sight direction of thevirtual camera VC), the position of the land horizon on the display 12remains unchanged, and the house object 35 is moved to a positionlocated in front of the land horizon. In other words, when the playercharacter 40 moves in the depth direction of the screen, the position onthe ground object 30 of the land horizon moves further away from thehouse object 35 in the depth direction, depending on the movement of theplayer character 40. Specifically, when the player character 40 moves inthe line-of-sight direction of the virtual camera VC (the depthdirection or the direction toward the virtual camera VC), the positionon the ground object 30 of the land horizon also moves while theposition on the display 12 of the land horizon remains unchanged. Whilethe position of the land horizon moves, the grass generation regionlocated with reference to the land horizon also moves.

When the player character 40 is moving on the ground object 30, grassobjects 32 are dynamically generated and displayed in the grassgeneration region located with reference to the land horizon. When theplayer character 40 moves, grass objects 32 are generated in a new grassgeneration region located with reference to the moved land horizon.Grass objects 32 that have been generated before the movement of theplayer character 40 are deleted if those grass objects 32 are no longerlocated in the grass generation region located with reference to themoved land horizon. Specifically, when the player character 40 moves inthe depth direction, the position on the ground object 30 of the landhorizon moves, depending on the movement of the player character 40, andgrass objects 32 are newly generated in a grass generation regionlocated with reference to the moved land horizon. Note that grassobjects 32 may be deleted by removing grass objects 32 disposed on theground object 30. Specifically, a grass object 32 disposed on the groundobject 30 may be deleted by removing the three vertices of the grassobject 32. Alternatively, a grass object 32 disposed on the groundobject 30 may be deleted by setting the height of the grass object 32 to“0” so that the grass object 32 is not displayed.

If the predetermined region located with reference to the land horizonis not within the region of the grassland object 30 a, no grass objects32 are generated in the predetermined region. Specifically, no grassobjects 32 are generated in the region of the road object 30 b on theground object 30, in which the player character 40 is allowed to move.For example, in FIG. 5, the road object 30 b is formed in a regionaround the house object 35, and no grass objects 32 are generated in theregion of the road object 30 b. In addition, even when the playercharacter 40 moves in the direction toward the virtual camera VC in thescreen of FIG. 5, no grass objects 32 are generated on the road object30 b.

No grass objects 32 are generated in regions of the grassland object 30a, in which the player character 40 is allowed to move, other than thepredetermined region located with reference to the land horizon.Specifically, no grass objects 32 are generated in a region of thegrassland object 30 a that is located closer to the virtual camera VCthan the predetermined region located with reference to the land horizonis. During execution of the game, when the player character 40 ismoving, the virtual camera VC also moves, following the player character40. Therefore, during execution of the game, the player character 40 islocated at a predetermined position (e.g., the center of the screen) onthe display 12. Because no grass objects 32 are generated in a regioncloser to the virtual camera VC than the predetermined region locatedwith reference to the land horizon is, the player character 40 moves andperforms a predetermined action in a region where no grass objects 32are generated.

If the player character 40 is located in a region where grass objects 32are generated, it may be difficult to see a necessary portion, anunnatural image may be displayed, or unnecessary calculation may berequired. For example, the feet of the player character 40 may be hiddenby grass objects 32 and therefore it may be difficult to see the feet,or when the player character 40 performs a predetermined action on apredetermined item (e.g., to pick up an item dropped on the ground), itmay be difficult to see the predetermined item. In addition, it may lookas if the feet of the player character 40 were floating above the grassobject 32. In order to display a natural image, a collision between thefeet of the player character 40 and grass objects 32 may be calculated,and display may be controlled based on the result of the calculation.For example, when the feet of the player character 40 strike grassobjects 32, the grass objects 32 may be deformed. However, such acalculation is complicated, and if a large number of grass objects 32are involved, a great burden is placed on the processor 20.

However, in this embodiment, grass objects 32 are generated in apredetermined region located with reference to the land horizon, and arenot generated in a region where the player character 40 is located.Therefore, such a problem can be avoided.

Thus, in this embodiment, three-dimensional grass objects 32 aregenerated in a grass generation region located with reference to theland horizon. Therefore, grass objects 32 having a predetermined heightcan be displayed in a land horizon portion, and the land horizon portioncan be represented so as to look real.

While no three-dimensional grass objects 32 are generated in a region ofthe grassland object 30 a that is closer to the virtual camera VC thanthe predetermined region located with reference to the land horizon is,a green texture image imitating grass is attached to the grasslandobject 30 a. The grass image on the grassland object 30 a is not athree-dimensional virtual object, unlike the grass object 32. Therefore,although a flat image is provided in a region closer to the virtualcamera VC than the grass generation region is, the angle between thedirection pointing from the virtual camera VC toward the closer region,and the ground object 30, is so great that a natural image can beprovided without the need of three-dimensional grass objects 32.Meanwhile, in the land horizon portion, the angle between the directionpointing from the virtual camera VC toward the land horizon, and theground object 30, is small. Therefore, if three-dimensional grassobjects 32 are not generated, the land horizon portion is flat, and aless realistic image is likely to be generated. However, in thisembodiment, grass objects 32 growing in the height direction aregenerated in the land horizon portion, and therefore, the land horizonportion can be represented so as to look natural.

Next, a method for generating grass objects 32 will be described. Inthis embodiment, in the virtual space, the flat ground object 30 andother objects (32, 35-37, 40, etc.) on the ground object 30 aredisposed. In the case where an image of the virtual space is generatedbased on the virtual camera VC, a portion of the virtual space includingthe ground object 30 and other objects, that is covered by at least thefield of view of the virtual camera VC, is deformed into a drum shape.Firstly, a drum deformation process of deforming the virtual space intoa drum shape will be described. Thereafter, the method for generatinggrass objects 32 will be described.

Drum Deformation Process

FIG. 6 is a diagram showing a non-limiting example virtual space beforethe drum deformation process is performed.

As shown in FIG. 6, in the virtual space, a ground object 30 is disposedas a terrain object, and a house object 35 is disposed on the groundobject 30. Note that in FIG. 6, other objects, except for the groundobject 30 and the house object 35, are not shown. In addition, a virtualcamera VC is set in the virtual space. For the virtual camera VC, aCxCyCz-coordinate system fixed to the virtual camera VC is set. TheCx-axis is a lateral direction axis of the virtual camera VC. TheCy-axis is an upward direction of the virtual camera VC. The Cz-axis isa line-of-sight direction of the virtual camera VC. In this embodiment,the Cx-axis is set to be parallel to the x-axis of the virtual space.The virtual camera VC is also movable in the height direction of thevirtual space. When the virtual camera VC is moved in the heightdirection, the virtual camera VC is turned around the Cx-axis (pitchdirection). Because the Cx-axis is set to be parallel to the x-axis ofthe virtual space, the direction in which the line-of-sight direction ofthe virtual camera VC extends along the ground object 30 is parallel tothe z-axis.

The drum deformation process is performed on the ground object 30 andthe objects on the ground object 30 of FIG. 6. FIG. 7 is a diagramshowing a non-limiting example virtual space after the drum deformationprocess is performed.

As shown in FIG. 7, in the drum deformation process, the entire terrainis deformed so that the ground object 30 extends along the side surfaceof a cylinder (drum). Specifically, the entire train is deformed so thatthe ground object 30 that forms the terrain is at least a portion of theside surface of a cylinder having a radius of R and a central axisparallel to the x-axis of the virtual space. Because the Cx-axis of thevirtual camera VC is set to be parallel to the x-axis of the virtualspace, the entire terrain is deformed so that the ground object 30gradually becomes lower in the line-of-sight direction of the virtualcamera VC (the depth direction of the screen when an image isdisplayed). In addition, a house object 35 (and other objects such as atree object 36 and a player character 40) on the ground object 30 aredeformed so that these objects are located along the ground object 30.

Specifically, in the drum deformation process, each of the vertices ofthe ground object 30 and each of the vertices of other objects disposedon the ground object 30 are subjected to coordinate conversion so thateach vertex is turned around the x-axis. The drum deformation processwill now be described in greater detail with reference to FIGS. 8 and 9.

FIG. 8 is a diagram showing a non-limiting example virtual space asviewed in a direction parallel to the x-axis before the drum deformationprocess is performed. FIG. 9 is a diagram showing a non-limiting examplevirtual space as viewed in a direction parallel to the x-axis after thedrum deformation process is performed.

As shown in FIG. 8, it is assumed that the y-coordinate value andz-coordinate value of a vertex V1 on the ground object 30 are (y1, z1).It is also assumed that the y-coordinate value and z-coordinate value ofa vertex V2 of the house object 35 are (y2, z2). It is also assumed thata predetermined distance in the z-axis direction is L. Note that L is afixed value.

In this embodiment, the height of the virtual camera VC is changedaccording to the user's operation. For example, it is assumed that theposition of the virtual camera VC can be set to “low,” “normal,” and“high.” When the virtual camera VC is located at the “low” position, theline-of-sight direction of the virtual camera VC is set to a firstdirection, and the angle between the z-axis and the Cz-axis is set to arelatively small value (e.g., 0-20 degrees). In this case, an image ofthe virtual space as viewed from a side is displayed on the display 12.When the virtual camera VC is located at the “normal” position, theline-of-sight direction of the virtual camera VC is set to a seconddirection pointing further downward than the first direction, and theangle between the z-axis and the Cz-axis is set to a value (e.g., 45degrees) greater than when the virtual camera VC is located at the “low”position. In this case, an image of the virtual space as vieweddiagonally above is displayed. When the virtual camera VC is located atthe “high” position, the line-of-sight direction of the virtual cameraVC is set to a third direction pointing further downward than the seconddirection, and the angle between the z-axis and the Cz-axis is set to arelatively great value (e.g., 60-70 degrees). In this case, an image ofthe virtual space as viewed from above is displayed.

In this case, the vertices V1 and V2 of FIG. 8 are displaced to verticesV1′ and V2′ shown in FIG. 9. Specifically, the y-coordinate value andz-coordinate value (y′, z′) of a vertex V′ after displacement arecalculated based on the y-coordinate value and z-coordinate value (y, z)of a vertex V before displacement, using expressions 1-5. Note that thex-coordinate value of each vertex remains unchanged.rad=θ×(z/L)  (1)temp_y=y+R  (2)y_t=temp_y×cos(rad)  (3)y′=y_t−R  (4)z′=temp_y×sin(rad)  (5)

Here, θ represents the central angle of an arc that is determined basedon the height of the virtual camera VC. R represents the radius of thearc (cylinder). Because the distance L in the z-axis direction has afixed value and θ is determined based on the height of the virtualcamera VC, R is determined based on L and θ (Rθ=L).

All the vertices of the ground object 30 and the objects on the groundobject 30 are subjected to the coordinate conversion based onexpressions 1-5. Specifically, each vertex is subjected to thecoordinate conversion based on expressions 1-5, which depends on theposition of the vertex in the z-axis direction. In other words, eachvertex is subjected to the coordinate conversion based on expressions1-5, which depends on the position of the vertex in the depth directionalong the ground object 30.

As shown in FIG. 9, for example, the vertex V1 on the ground object 30is displaced to a position on the arc having a radius of R and a centralangle of θ. By performing similar coordinate conversion on all verticeson the ground object 30, the ground object 30 is deformed so as to forma portion of the side surface of a cylinder having a radius of R. Thevertex V2 of the house object 35 on the ground object 30 is subjected tosimilar coordinate conversion to be displaced to a position shown inFIG. 9. By performing similar coordinate conversion on all vertices ofthe house object 35, the house object 35 is disposed on the side surfaceof the cylinder.

In the drum deformation process, each vertex is displaced by the GPU 22using the vertex shader function. Specifically, the GPU 22 performs thecoordinate conversion based on expressions 1-5 according to aninstruction from the CPU 21. Thereafter, the GPU 22 performs a renderingprocess based on the virtual camera VC, and causes the display 12 todisplay an image. Specifically, each time an image is displayed on thedisplay 12 (for each frame), the vertices of the ground object 30 andthe objects on the ground object 30 are displaced by the GPU 22 usingthe vertex shader function, so that the entire terrain is deformed.

Note that θ is determined by the line-of-sight direction of the virtualcamera VC (the height of the virtual camera VC). For example, when theline-of-sight direction of the virtual camera VC is set to the firstdirection, θ is set to a first value. When the line-of-sight directionof the virtual camera VC is set to the second direction, θ is set to asecond value greater than the first value. Specifically, when theline-of-sight direction of the virtual camera VC is set to the seconddirection pointing further downward than the first direction, θ is setto a greater value. In other words, when the line-of-sight direction ofthe virtual camera VC is the second direction pointing further downwardthan the first direction, the resultant deformed ground has a greatercurvature.

Meanwhile, when the line-of-sight direction of the virtual camera VC isset to the third direction pointing further downward than the seconddirection, the value of θ is set to a third value smaller than the firstand second values. In other words, when the line-of-sight direction ofthe virtual camera VC is the third direction pointing further downwardthan the second direction, the resultant deformed ground has a smallercurvature.

Note that when the virtual camera VC is located at a position (e.g., thedirection in which the virtual space is viewed from directly above)higher than the “high” position of FIG. 8, the drum deformation processmay not be performed. In other words, when the virtual camera VC is setat a position where the entire virtual space is viewed like looking at amap, the process of deforming the terrain and objects on the terraininto a drum shape may not be performed.

Method for Generating Grass Objects 32

FIG. 10 is a diagram for describing a method for determining a grassgeneration region. FIG. 11 is a diagram showing a non-limiting exampleheight of the grass object 32.

As shown in FIG. 10, in determining a grass generation region, the CPU21 calculates the tangent line from the position of the virtual cameraVC to the ground object 30 after the drum deformation process. The pointof tangency between the tangent line and the drum-shaped ground object30 is indicated by P. A line determined based on the point P of tangencyis a land horizon (a boundary line between the ground object 30 and thebackground) as viewed from the virtual camera VC. For example, a tangentline (perpendicular to the x-axis) may be drawn from the position of thevirtual camera VC to the ground object 30, and a land horizon may bedefined as a straight line that passes through the point P of tangencyof the tangent line, extending in parallel to the x-axis. The CPU 21determines, as a grass generation region, a predetermined regionincluding a region that includes the point P of tangency (land horizon)and is closer to the virtual camera VC than the land horizon is, and aregion that is further from the virtual camera VC than the point P oftangency is in the line-of-sight direction of the virtual camera VC (ina direction away from the virtual camera VC). Note that the grassgeneration region is determined before the drum deformation process isactually performed. Specifically, the CPU 21 calculates the tangent linethat will be in contact with a cylindrical object when the drumdeformation process has been performed on the flat ground object 30.

Note that when the virtual camera VC is located at some heights, theland horizon may not be included in the field of view of the virtualcamera VC. In this case, a tangent line cannot be drawn, and therefore,a grass generation region is not present, and no grass objects 32 aregenerated. For example, when the virtual camera VC is located at the“high” position of FIG. 8, the land horizon is not be included in thefield of view of the virtual camera VC, and therefore, no grass objects32 are generated.

When the CPU 21 determines a grass generation region, the CPU 21disposes a plurality of grass objects 32 in the grass generation regionon the flat ground object 30, and determines the height of each grassobject 32. As shown in FIG. 11, in a region A closer to the virtualcamera VC than the point P of tangency (land horizon) is, the height ofthe grass object 32 varies depending on the distance from the virtualcamera VC. Specifically, in the region A, the height of the grass object32 is determined so as to decrease with a decrease in the distance fromthe virtual camera VC. Specifically, the height of the grass object 32gradually becomes higher in the depth direction (the line-of-sightdirection of the virtual camera VC) in a range from a position closer tothe virtual camera VC than the point P of tangency is to the point P oftangency. The height of the grass object 32 is greatest at the point Pof tangency (land horizon), and in a region B extending from the point Pof tangency in the depth direction, the greatest height is maintained.Note that in a region C closer to the virtual camera VC than the regionA is, grass objects 32 are disposed on the ground object 30, but theheights of the grass objects 32 are set to “0.” Specifically, the threevertices of each grass object 32 are disposed on the ground object 30.Therefore, in the region C, it looks like there is no growth of thegrass objects 32. In a region closer to the virtual camera VC than theregion C is, no grass objects 32 are disposed (i.e., the three verticesare not disposed).

The peak vertex of a triangular grass object 32 is displaced by the GPU22 using the vertex shader function, so that the grass object 32 isgenerated and displayed. Specifically, the height of the grass object 32determined by the CPU 21 is input to the GPU 22, which in turn displacesthe position of the peak vertex of the grass object 32 by coordinateconversion. As a result, the peak vertices of grass objects 32 are movedin the vertical direction, and therefore, it looks like grass objects 32seamlessly appear.

After the peak vertices of grass objects 32 are displaced, a portion ofthe virtual space including the ground object 30 and objects (the grassobjects 32, the house object, the tree object, the player character 40,etc.) disposed on the ground object 30, that is covered by at least thefield of view of the virtual camera VC, is deformed by the drumdeformation process. The drum deformation process is performed by theGPU 22 displacing the vertices of each object using the vertex shaderfunction. Thereafter, the GPU 22 generates an image of the virtualspace, which is displayed on the display 12 as shown in FIG. 5.

When the virtual camera VC moves from the state of FIG. 10 in the depthdirection, the grass generation region also moves. FIG. 12 is a diagramshowing a non-limiting example in which the virtual camera VC has movedrelative to the ground object 30 from the state of FIG. 10.

For example, when the virtual camera VC moves from the state of FIG. 10in the depth direction, the position of the point P of tangency on theground object 30 moves. While in FIG. 10 the grass generation region islocated closer to the virtual camera VC than the house object 35 is, inFIG. 12 the grass generation region is located beyond the house object35. Thus, the grass generation region moves, depending on the movementof the virtual camera VC in the depth direction. When the virtual cameraVC moves in the depth direction, the tangent line from the virtualcamera VC to the cylindrical ground object 30 is calculated and thegrass generation region is set in real time. As a result, grass objects32 are generated or removed, depending on the movement of the virtualcamera VC in the depth direction. In addition, the height of the grassobject 32 is changed, depending on the movement of the virtual camera VCin the depth direction.

Note that the player character 40 and the virtual camera VC may be movedon the ground object 30 by moving the player character 40 and thevirtual camera VC in the virtual space in the depth direction.Alternatively, the player character 40 and the virtual camera VC may beapparently moved in the depth direction by turning the entiredrum-shaped terrain with the positions of the player character 40 andthe virtual camera VC remaining unchanged. In other words, as long asthe player character 40 and the virtual camera VC are controlled so thatthe player character 40 and the virtual camera VC move on the terrain,the player character 40 and the virtual camera VC may be moved in thevirtual space, or the drum-shaped terrain may be turned with thepositions in the virtual space of the player character 40 and thevirtual camera VC fixed.

For example, the drum-shaped terrain may be turned by adding an anglecorresponding to the amount of movement in the depth direction when thecoordinate conversion described with reference to FIG. 9 is performed.Specifically, “rad” is calculated using the following expression 1′instead of expression 1.rad=θ×((z+OFFSET)/L)  (1′)

Here, “OFFSET” is determined based on the movement in the depthdirection of the player character 40. As shown in expression 1′, “rad”is calculated based on a value obtained by adding the OFFSET value to z.Thereafter, “rad” calculated using expression 1′ is substituted intoexpressions 2 and 5, so that the coordinate values of a converted vertexV are calculated. As a result, the entire terrain can be deformed into adrum shape, and the entirety of the drum-shaped terrain can be turnedaround the central axis of the drum, and therefore, apparent movement ofthe virtual camera VC can be achieved without actually moving thevirtual camera VC in the virtual space. Specifically, by adding theOFFSET value to the z-coordinate value as in expression 1′, it looks asif the virtual camera VC moved in the depth direction by the amount of“OFFSET.”

As described above, in this embodiment, grass objects 32 are generatedin a predetermined region that is located on the ground object 30 withreference to a boundary line (land horizon) between the ground object 30and the background as viewed from the virtual camera VC. Therefore, theboundary line portion on the ground object 30 can be represented so asto look real. In addition, the player character 40 is located closer tothe virtual camera VC than the predetermined region is, and moves andperforms a predetermined action in a region where no grass objects 32are generated. As a result, it can be reliably easy to see scenes thatthe player character 40 moves and performs a predetermined action on apredetermined item.

Grass objects 32 are generated so as to gradually become longer towardthe boundary line from a region closer to the virtual camera VC than theboundary line is. Because longer grass objects 32 are formed on theboundary line of the ground object 30, the scene that grass objects 32grow upward from the ground object 30 in the virtual space can beenhanced, resulting in an increase in reality.

In this embodiment, the ground object 30 is deformed along thecircumferential direction of a cylinder as viewed from the virtualcamera VC, and therefore, it can be easier to see the scene that grassobjects 32 grow from the land horizon portion.

In this embodiment, the heights of grass objects 32 are adjusted by theGPU 22 using the vertex shader function in real time. As a result, it isnot necessary to previously prepare grass objects 32 having differentheights.

A grass object 32 can be moved by displacing a vertex of the grassobject 32 using the vertex shader function of the GPU 22. For example,when the wind blows in the virtual space, the scene that grass objects32 sway can be displayed by displacing the peak vertices of the grassobjects 32 rightward and leftward. For example, in the case where amoving image recording the scene that grass objects 32 sway isdisplayed, the amount of data may be large, and the grass objects 32 maysway monotonously. In the case where vertices of grass objects 32 aredisplaced by the GPU 22 using the vertex shader function, it is notnecessary to prepare such a moving image. In addition, for example, byproviding a random displacement pattern, the swaying of grass objects 32can be represented so as to look natural.

In this embodiment, the vertices of a flat terrain and objects on theterrain are displaced in real time by the GPU 22 using the vertex shaderfunction. As a result, it is not necessary to previously prepare acurved terrain. In the case where a curved terrain is previouslycreated, other objects (the house object 35 and the tree object 36)disposed on the terrain need to be created so as to fit the curvedsurface, and therefore, a game creator needs to spend a lot of time andeffort. Specifically, when an object is disposed on a curved terrain, itis necessary to form the bottom surface of the object that is in contactwith the ground, into a curved surface shape extending along theterrain, and it is also necessary to form the entire object into a shapethat fits the bottom surface. In the case where different terrainshaving different curvatures are prepared, it is necessary to createobjects for each curvature. However, in this embodiment, a flat terrainand objects disposed on the terrain are previously prepared, and thevertices of the flat terrain and the objects disposed on the terrain aredisplaced in real time by the GPU 22 using the vertex shader function.Therefore, it is not necessary to previously prepare a curved terrain oran object that fits the curved terrain. Therefore, game developmentefficiency can be improved.

In this embodiment, in the drum deformation process, the curvature ofthe drum is decreased (θ is decreased) when the line-of-sight directionof the virtual camera VC is the first direction, and the curvature ofthe drum is increased (θ is increased) when the line-of-sight directionof the virtual camera VC is the second direction pointing furtherdownward than the first direction. As a result, an image that is easy tosee for the user can be provided. For example, far locations in thedepth direction are not displayed, due to the curved ground, andtherefore, a region near the player character 40 can be more easily seenby the user, and therefore, the game can be made more enjoyable. Whenthe line-of-sight direction of the virtual camera VC is the firstdirection (lateral direction), the curvature is small, and therefore,even when the entire terrain is deformed into a drum shape, an imagethat is natural to the user can be provided. For example, if thecurvature is extremely great, the entire terrain looks greatly curved,so that an image that is unnatural to the user is likely to bedisplayed. However, in this embodiment, when the line-of-sight directionof the virtual camera VC is the first direction (lateral direction), thecurvature of the drum is set to a small value, and therefore, such anunnatural feeling is less likely to occur.

Details of Game Process

Next, a non-limiting example game process that is performed in the bodyapparatus 2 will be specifically described. Firstly, data that is storedin the body apparatus 2 will be described.

FIG. 13 is a diagram showing non-limiting example data stored in thebody apparatus 2 (the DRAM 26 thereof). As shown in FIG. 13, the bodyapparatus 2 stores a game program, terrain object data, character data,virtual camera data, and grass object data. In addition to these kindsof data, the body apparatus 2 stores various kinds of data such asoperation data corresponding to the user's operation, and other data ofitems, etc., used in a game.

The game program is for executing a game of this embodiment. The gameprogram is, for example, stored in an external storage medium, andloaded from the external storage medium to the DRAM 26 during the startof the game.

The terrain object data is related to an object representing a terrainin the virtual space. The terrain object data contains the flat groundobject 30, the flat river object 31, on which no grass objects 32 aregenerated, etc. The terrain object data also contains data that isrelated to the grassland object 30 a, on which grass objects 32 can begenerated, and the road object 30 b, on which no grass objects 32 aregenerated. Data related to the ground object 30 contains a plurality ofvertices.

The object data indicates other kinds of objects (the house object 35,the tree object 36, the cliff object 37, etc.) disposed on a terrain.Each piece of object data contains a plurality of vertices. A piece ofobject data contains, as data indicating each vertex, data indicating aposition relative to a representative vertex. When an object (e.g., thehouse object 35) is disposed in the virtual space, the coordinate valuesin the virtual space of each vertex of the object are determined basedon data indicating the relative position thereof. The object data is,for example, stored in an external storage medium, and loaded from theexternal storage medium to the DRAM 26 during the start of the game.

The character data contains data indicating the player character 40disposed on a terrain. The data indicating the player character 40contains a plurality of vertices, and as data indicating each vertex,data indicating a position relative to a representative vertex. Notethat the character data may contain data indicating a character that iscontrolled by the CPU 21 (so-called CPU character).

The virtual camera data, which is related to a state of the virtualcamera VC, indicates the position in the virtual space, line-of-sightdirection, etc., of the virtual camera VC.

The grass object data is related to each grass object 32. The datarelated to each grass object 32 contains data indicating the position ofthe grass object 32 and data indicating the height of the grass object32.

Next, a game process performed in the body apparatus 2 will be describedin detail. FIG. 14 is a flowchart showing a non-limiting example gameprocess performed in the processor 20 of the body apparatus 2. Theprocess of FIG. 14 is performed by the CPU 21 or the GPU 22 of the bodyapparatus 2 executing a game program. Note that FIG. 14 shows onlyprocesses related to the generation of grass objects 32 and the drumdeformation process, and does not show the other processes (e.g., theprocess of causing the player character 40 to perform a predeterminedaction, etc.).

As shown in FIG. 14, the CPU 21 performs an initial process (step S100).In the initial process, a fixed xyz-coordinate system is set in thevirtual space, and each object is disposed in the virtual space. As aresult, a terrain including a flat ground object, a river object, etc.,is formed in the virtual space, and other objects (the house object 35,the tree object 36, the player character 40, etc.) are disposed on theterrain. When the position in the virtual space of each object isdetermined, the positions in the virtual space of the vertices of eachobject are determined. In addition, the virtual camera VC is disposed inthe virtual space.

After step S100, the CPU 21 executes step S101. Thereafter, the CPU 21executes steps S101-S110 repeatedly, i.e. at predetermined frame timeintervals (e.g., 1/60 sec).

In step S101, the CPU 21 obtains operation data from a controller (theleft controller 3 or the right controller 4), and based on the operationdata, determines whether or not an operation of moving the playercharacter 40 has been performed (step S101).

If it is determined that an operation of moving the player character 40has been performed (step S101: YES), the CPU 21 performs a process ofmoving the player character 40 (step S102). For example, when the userinputs an instruction to move in the depth direction (z-axis direction),the CPU 21 moves the player character 40 in the depth direction.

If step S102 has been executed or if the determination result of stepS101 is negative (NO), the CPU 21 performs a virtual camera settingprocess (step S103). Specifically, the CPU 21 sets the height(line-of-sight direction) of the virtual camera VC according to theuser's operation. When the user changes the height of the virtual cameraVC, the CPU 21 sets the height (position and line-of-sight direction) ofthe virtual camera VC.

Following step S103, the CPU 21 sets the central angle θ, depending onthe state of the virtual camera VC (step S104). Specifically, the CPU 21sets the central angle θ based on the line-of-sight direction (height)of the virtual camera VC set in step S103.

Next, the CPU 21 determines whether or not the player character 40 hasmoved in the depth direction (z-axis direction) according to the user'soperation (step S105).

If it is determined that the player character 40 has moved in the depthdirection (step S105: YES), the CPU 21 sets an offset value (step S106).The offset value set in this case is the “OFFSET” of expression 1′.Specifically, the CPU 21 sets the offset value based on the movement ofthe player character 40 in the z-axis direction. For example, the CPU 21sets a negative offset value if the player character 40 has moved in thepositive z-axis direction, and a positive offset value if the playercharacter 40 has moved in the negative z-axis direction.

If step S106 has been executed or if the determination result of stepS105 is negative (NO), the CPU 21 performs a grass generation process(step S107). The grass generation process of step S107 will now bedescribed in detail.

FIG. 15 is a flowchart showing a non-limiting example of the grassgeneration process of step S107.

Initially, the CPU 21 calculates the tangent line from the position ofthe virtual camera VC to the ground object 30 deformed in a drum shape,in the field of view of the virtual camera VC (step S120).

Next, the CPU 21 determines a grass generation region (step S121).Specifically, the CPU 21 determines, as a grass generation region, apredetermined region on the ground object 30 that includes the point Pof tangency (a region including a region closer to the virtual camera VCthan the point P of tangency is and a region further or deeper from thevirtual camera VC than the point P of tangency is).

Next, the CPU 21 disposes a plurality of grass objects 32 in thedetermined grass generation region (step S122). For example, the CPU 21may dispose a plurality of grass objects 32 in the grass generationregion so that the grass objects 32 are equally spaced. Here, aplurality of grass objects 32 are disposed in the grass generationregion of the flat ground object 30. Note that the CPU 21 does notdispose a grass object 32 in a region of the grass generation regiondetermined in step S121 that no grass objects are not allowed to begenerated (e.g., the region of the road object 30 b).

Following step S122, the CPU 21 determines the height of each grassobject 32 (step S123). The method for determining the height of thegrass object 32 is as described above with reference to FIG. 11.

Next, the CPU 21 generates grass objects 32 in the grass generationregion (step S124). Specifically, the CPU 21 transmits an instruction tothe GPU 22 to displace the peak vertex of each grass object 32,depending on the determined height of the grass object 32. The GPU 22performs coordinate conversion on the peak vertices of the grass objects32 using the vertex shader function according to the instruction, todisplace the peak vertex of each grass object 32. As a result, the grassobjects 32 are generated on the ground object 30 in the grass generationregion.

After execution of step S124, the CPU 21 returns to the process of FIG.14.

Referring back to FIG. 14, following step S107, the CPU 21 causes theGPU 22 to execute the drum deformation process of deforming the terrainand each object on the terrain (step S108). The GPU 22 displaces thevertices of the terrain object 30 and each object (the grass objects 32,the house object 35, the tree object 36, the player character 40, etc.)on the terrain object 30, using the vertex shader function. Byperforming the drum deformation process, the flat ground is deformed toform a portion of the side surface of a cylinder, and the objects on theground are also deformed to fit the side surface of the cylinder. Notethat if the offset value has been set in step S106, the displacement ofthe vertices is calculated using expression 1′.

Thereafter, the CPU 21 causes the GPU 22 to perform a rendering processbased on the virtual camera VC (step S109). As a result, an image of theterrain and the objects on the terrain that have been deformed by thedrum deformation process, as viewed from the virtual camera VC, isgenerated. The generated image is output to the display 12, on which theimage of the virtual space is displayed (step S110).

Note that the drum deformation process of step S108 are performed onlyon vertices included in the field of view (image capture range) of thevirtual camera VC. In other words, the drum deformation process is notperformed on vertices that are not included in the field of view of thevirtual camera VC.

If step S110 has been performed, the CPU 21 executes step S101 again.Thus, FIG. 14 has been described.

Thus, the grass generation process of step S107 and the drum deformationprocess of step S108 are executed repeatedly, i.e. at frame timeintervals. Even when the player character 40 moves in the z-axisdirection, so that the position on the ground object 30 of the landhorizon is changed, the grass generation process is performed in realtime.

As described above, in this embodiment, the tangent line from thevirtual camera VC to the ground object 30 deformed in a drum shape iscalculated, and based on the point P of tangency, a grass generationregion is determined. Thereafter, a plurality of grass objects 32 aredisposed in the grass generation region, the heights of the grassobjects 32 are determined, and the vertices of the grass object 32 aredisplaced, whereby the grass objects 32 are generated. Thus, the grassobjects 32 are generated in a predetermined region that is located withreference to a boundary line between the ground object 30 and thebackground as viewed from the virtual camera VC. As a result, the groundsurface can be represented so as to look real.

Variations

In the foregoing, the image processing of this embodiment has beendescribed. The above embodiment is merely for illustrative purposes. Thefollowing variations may be additionally provided, for example.

For example, although in the above embodiment, the grass objects 32 aregenerated on the grassland object 30 a, grass objects are not the onlyobjects that are generated. For example, in a game scene that snow lies,a snow object having a height may be generated in a predetermined regionlocated with reference to the boundary line between the ground object 30and the background. A snow object may be formed of a single triangularpolygon like a grass object, or may be a combination of a plurality oftriangles. A height of a snow object (a height of accumulated snow) maybe greatest at the boundary line like the grass object 32, and maygradually become smaller toward the virtual camera VC in a region closerto the virtual camera VC than the boundary line is. In this case, theremay be a region where a snow object is disposed (e.g., the region of thegrassland object 30 a) and a region where no snow object is disposed(e.g., the region of the road object 30 b).

In addition to or instead of a grass object and a snow object, anysuitable predetermined object having a height may be generated in thepredetermined region.

In the above embodiment, grass objects 32 are generated in thepredetermined region located with reference to the land horizon. Thepredetermined region located with reference to the land horizon may beeither a region that includes the land horizon or a region that does notinclude the land horizon (e.g., a region closer to the virtual camera VCthan the land horizon is).

In the above embodiment, objects are generated in a predetermined regionlocated with reference to the land horizon that is a boundary linebetween the ground object 30 and the background as viewed from thevirtual camera VC. In another embodiment, a predetermined object havinga height is generated in a predetermined region located with referenceto a boundary line between any suitable terrain object and thebackground as viewed from the virtual camera VC. For example, apredetermined object may be generated in a predetermined region locatedwith reference to a sea horizon that is a boundary line between aterrain object representing a sea, lake, or river and the background.For example, a scene that the sea horizontal portion undulates may berepresented by generating wave object having a predetermined height asthe predetermined object in a predetermined region located withreference to the sea horizon. In addition to or instead of a flatground, a mountain or heel object having a height may be disposed in thevirtual space, and a predetermined object may be generated in apredetermined region located with reference to a boundary line betweenthe mountain or heel object and the background (a boundary line asviewed from the virtual camera VC).

Specifically, a terrain object representing any terrain (e.g., a groundobject, a sea or river object, a mountain object, etc.) may be disposedin the virtual space, and a predetermined object may be disposed in apredetermined region located with reference to a boundary line (alsoreferred to as a “ridge line”) between the terrain object and thebackground. As used herein, the boundary line (ridge line) refers to aboundary between a terrain object and the background as viewed from thevirtual camera VC, such as a land horizon, a sea horizon, and a contourof a mountain when the mountain is viewed in front of the background.

In the above embodiment, the ground object 30 is assumed to have a drumshape (the side surface of a cylinder). In another embodiment, theterrain object may have a spherical shape or any other suitable curvedshape.

Although in the above embodiment, the drum deformation process ofdeforming the ground object 30 into a drum shape is performed, the drumdeformation process may not necessarily be performed. Specifically, whena flat terrain is displayed, a predetermined object may be generated ina predetermined region located with reference to a boundary line betweenthe flat terrain and the background.

In the above embodiment, in the drum deformation process, coordinateconversion is performed on each vertex by the GPU 22 using the vertexshader function. In another embodiment, coordinate conversion may beperformed on each vertex by the CPU 21.

The process of the above flowchart is merely for illustrative purposes.The order and details of the steps may be changed as appropriate.

The above game is merely for illustrative purposes. The above-describedprocess may be performed in any other suitable games.

In the above embodiment, it is assumed that the above process isperformed in the body apparatus 2 of the game system 1. Alternatively,the above process may be performed in any other suitable imageprocessing apparatuses (e.g., a personal computer, smartphone, andtablet terminal), etc. In still another embodiment, the above processmay be performed in an image processing system including a plurality ofapparatuses (e.g., a system including a terminal and a server).

In the foregoing, this embodiment has been described. The abovedescription is merely an illustration of this embodiment, and variousmodifications and changes may be made thereto.

While certain example systems, methods, devices and apparatuses havebeen described herein, it is to be understood that the appended claimsare not to be limited to the systems, methods, devices and apparatusesdisclosed, but on the contrary, are intended to cover variousmodifications and equivalent arrangements included within the spirit andscope of the appended claims.

What is claimed is:
 1. A non-transitory computer-readable storage medium having stored therein an image processing program for causing a computer of an information processing apparatus to execute: controlling a virtual camera in a virtual space including terrain; modeling at least one three-dimensional object as a collection of polygons having peak vertices, in a range located with reference to a horizon at an intersection between the terrain and a background as viewed from the virtual camera; moving the virtual camera or the terrain so that a relative positional relationship between the virtual camera and the terrain changes; when a first area on the terrain that is not included in the range before the movement is included in the range due to the movement, transforming together coordinates of the peak vertices of the collection of polygons in the first area based on the relative positional relationship between the virtual camera and the terrain to cause the at least one three-dimensional object to appear in the first area; and generating, for display on a display device, an image of the virtual space based on the virtual camera.
 2. The non-transitory computer-readable storage medium according to claim 1, wherein the terrain is in the shape of at least a portion of the side surface of a cylinder or at least a portion of a spherical surface.
 3. The non-transitory computer-readable storage medium according to claim 1, wherein the terrain is flat, and the image processing program causes the computer to further execute: deforming at least the range of the flat terrain corresponding a field of view of the virtual camera, to generate the terrain having a curved surface shape.
 4. The non-transitory computer-readable storage medium according to claim 3, wherein the horizon comprises a horizon at which the terrain and sky intersect, that is determined based on a point of tangency of a tangent line from the virtual camera to the curved surface.
 5. The non-transitory computer-readable storage medium according to claim 3, wherein the computer includes a graphics processor having a vertex shader function, and the deformation of the terrain and generation of the at least one three-dimensional object are performed by coordinate conversion using the vertex shader function.
 6. The non-transitory computer-readable storage medium according to claim 5, wherein the at least one three-dimensional object includes a grassy region comprising grass blade objects modeled with the polygons, and on a portion of the terrain on which generation of the grassy region is allowed, the grassy region is generated by coordinate conversion of peak vertices of the polygons so that grass blade objects located closer to the virtual camera in the range have a shorter length than grass blade objects located further away from the virtual camera in the range.
 7. The non-transitory computer-readable storage medium according to claim 5, wherein the object includes a snowy region modeled with the polygons, and on a portion of the terrain on which generation of the snowy region is allowed, the snowy region is generated by coordinate conversion of a vertices of the polygons modeling the snowy region so that polygons modeling the snowy region located closer to the virtual camera in the range have a smaller height than polygons modeling the snowy region located further away from the virtual camera in the range.
 8. The non-transitory computer-readable storage medium according to claim 1, wherein the horizon comprises a horizon at which the terrain and sky intersect, that is determined based on a positional relationship between the virtual camera and the terrain.
 9. The non-transitory computer-readable storage medium according to claim 1, wherein the at least one three-dimensional object has a height, and the at least one three-dimensional object is generated so that the height of the at least one three-dimensional object varies depending on a distance thereof from the virtual camera.
 10. The non-transitory computer-readable storage medium according to claim 1, wherein the image processing program causes the computer to further execute: moving a player character on the terrain according to an operation input, and a position of the virtual camera is controlled based on a position of the player character so that the player character is located in front of the virtual camera in a line-of-sight direction of the virtual camera, and the horizon is located further from the virtual camera than the player character is in the line-of-sight direction of the virtual camera.
 11. The non-transitory computer-readable storage medium according to claim 10, wherein the image processing program causes the computer to further execute: disposing an item object on the terrain; and causing the player character to perform an action on the item object, according to the operation input.
 12. The non-transitory computer-readable storage medium according to claim 1, wherein the image processing program causes the computer to further execute: moving a player character on the terrain that is flat, in the virtual space, according to an operation input; controlling a position of the virtual camera based on a position of the player character; generating the at least one three-dimensional object at a position corresponding to the range on the flat terrain based on the position of the virtual camera; and displacing vertices of the terrain, the at least one three-dimensional object, and the player character that are included in at least a field of view of the virtual camera so that the flat terrain is deformed into a curved surface.
 13. The non-transitory computer-readable storage medium according to claim 1, further including generating a terrain object which shares vertices with at least one other terrain object and is a part of the terrain.
 14. An image processing system comprising at least one processor, wherein the at least one processor executes: controlling a virtual camera in a virtual space including terrain; modeling at least one three-dimensional object as a collection of polygons having peak vertices, in a range located with reference to a horizon at an intersection between the terrain and a background as viewed from the virtual camera; generating an image of the virtual space, based on the virtual camera; moving the virtual camera or the terrain so that a relative positional relationship between the virtual camera and the terrain changes; when a first area on the terrain that is not included in the range before the movement is included in the range due to the movement, transforming coordinates of the peak vertices of the collection of polygons together in the first area based on the relative positional relationship between the virtual camera and the terrain to cause the at least one three-dimensional object to appear in the first area; and causing a display device to display the image of the virtual space.
 15. The image processing system according to claim 14, wherein the terrain is in the shape of at least a portion of the side surface of a cylinder or at least a portion of a spherical surface.
 16. The image processing system according to claim 14, wherein the at least one processor further executes: deforming at least a range of a flat terrain corresponding a field of view of the virtual camera, to generate the terrain having a curved surface shape.
 17. The image processing system according to claim 16, wherein the horizon comprises a horizon representing intersection between the terrain and sky, that is determined based on a point of tangency of a tangent line from the virtual camera to the curved surface.
 18. The image processing system according to claim 16, wherein the at least one processor includes a graphics processor having a vertex shader function, and the deformation of the terrain and generation of the at least one three-dimensional object are performed by coordinate conversion using the vertex shader function.
 19. The image processing system according to claim 18, wherein the at least one three-dimensional object includes a grassy region comprises grass blade objects modeled as polygons, and on a portion of the terrain on which generation of the grassy region is allowed, the grassy region is generated by coordinate conversion of peak vertices of the polygons so that grass blade objects located closer to the virtual camera in the range have a shorter length than grass blade objects located further away from the virtual camera in the range.
 20. The image processing system according to claim 18, wherein the at least one three-dimensional object includes a snowy region modeled as polygons, and on a portion of the terrain on which generation of the snowy region is allowed, the snowy region is generated by coordinate conversion of peak vertices of the polygons modeling the snowy region so that the polygons modeling the snowy region that are located closer to the virtual camera in the range have a smaller height than the polygons modeling the snowy region that are located further away from the virtual camera in the range.
 21. The image processing system according to claim 14, wherein the horizon comprises a horizon that is determined based on a positional relationship between the virtual camera and the terrain.
 22. The image processing system according to claim 14, wherein the at least one three-dimensional object has a height, and the at least one three-dimensional object is generated so that the height of the at least one three-dimensional object varies depending on a distance thereof from the virtual camera.
 23. The image processing system according to claim 14, wherein the at least one processor further executes: moving a player character on the terrain according to an operation input, and a position of the virtual camera is controlled based on a position of the player character so that the player character is located in front of the virtual camera in a line-of-sight direction of the virtual camera, and the horizon is located further from the virtual camera than the player character is in the line-of-sight direction of the virtual camera.
 24. The image processing system according to claim 23, wherein the at least one processor further executes: disposing an item object on the terrain; and causing the player character to perform an action on the item object, according to the operation input.
 25. The image processing system according to claim 14, wherein the at least one processor further executes: moving a player character on the terrain that is flat, in the virtual space, according to an operation input; controlling a position of the virtual camera based on a position of the player character; generating the at least one three-dimensional object at a position corresponding to the range on the flat terrain based on the position of the virtual camera; and displacing vertices of the terrain, the polygons modeling the at least one three-dimensional object, and the player character that are included in at least a field of view of the virtual camera so that the flat terrain is deformed into a curved surface.
 26. An image processing apparatus for executing: controlling a virtual camera in a virtual space including terrain; modeling at least one three-dimensional object as a collection of polygons having peak vertices, in a range located with reference to a horizon at an intersection between the terrain and a background as viewed from the virtual camera; generating an image of the virtual space, based on the virtual camera; moving the virtual camera or the terrain so that a relative positional relationship between the virtual camera and the terrain changes; when a first area on the terrain that is not included in the range before the movement is included in the range due to the movement, transforming together coordinates of the peak vertices of the collection of polygons in the first area based on the relative positional relationship between the virtual camera and the terrain to cause the at least one three-dimensional object to appear in the first area; and causing a display device to display the generated image of the virtual space.
 27. The image processing apparatus according to claim 26, further executing: moving a player character on the terrain that is flat, in the virtual space, according to an operation input; controlling a position of the virtual camera based on a position of the player character; generating the at least one three-dimensional object at a position corresponding to the range on the flat terrain based on the position of the virtual camera; and displacing vertices of the terrain, the polygons modeling the at least one three-dimensional object, and the player character that are included in at least a field of view of the virtual camera so that the flat terrain is deformed into a curved surface.
 28. An image processing method to be executed by an image processing system, the method causing the system to execute: controlling a virtual camera in a virtual space including terrain; modeling at least one three-dimensional object as a collection of polygons having peak vertices, in a range located with reference to a horizon at an intersection between the terrain and a background as viewed from the virtual camera; moving the virtual camera or the terrain so that a relative positional relationship between the virtual camera and the terrain changes; when a first area on the terrain that is not included in the range before the movement is included in the range due to the movement, transforming together coordinates of the peak vertices of the collection of polygons in the first area based on the relative positional relationship between the virtual camera and the terrain to cause the at least one three-dimensional object to appear in the first area; and generating an image of the virtual space, based on the virtual camera, the image being to be displayed on a display device.
 29. The image processing method according to claim 28, wherein the method causes the system to further execute: moving a player character on the terrain that is flat, in the virtual space, according to an operation input; controlling a position of the virtual camera based on a position of the player character; generating the at least one three-dimensional object at a position corresponding to the range on the flat terrain based on the position of the virtual camera; and displacing vertices of the terrain, the polygons modeling the at least one three-dimensional object, and the player character that are included in at least a field of view of the virtual camera so that the flat terrain is deformed into a curved surface. 